package az.mecid.rssreader.client.services;

import az.mecid.rssreader.client.model.FeedItem;
import az.mecid.rssreader.client.services.utils.Callback;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.google.gwt.core.client.GWT;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: mega
 * Date: 17.03.2010
 * Time: 19:43:48
 */
@RemoteServiceRelativePath("FeedService")
public interface FeedService extends RemoteService {

    public List<FeedItem> getFeedItems();


    /**
     * Utility/Convenience class.
     * Use FeedService.App.getInstance() to access static instance of FeedServiceAsync
     */
    public static class App {
        private static final FeedServiceAsync ourInstance = (FeedServiceAsync) GWT.create(FeedService.class);

        public static FeedServiceAsync getInstance() {
            return ourInstance;
        }
    }
}
